<template>
  <div class="brief">
    <div class="title">{{ data.columnName }}</div>
    <div class="summary">
      <span>发布日期：{{ data.publishDate }}</span>
    </div>
    <div v-html="data.cotent"></div>
    <div class="downClass" v-if="data.annexes && data.annexes[0]">
      <div>附件下载：</div>
      <div v-for="item in data.annexes" :key="item.fileId" class="downDiv">
        <div>
          <span class="name">{{ item.fileName }}</span>
          <a-icon class="icon" type="download" @click="downClick(item)" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => { }
    }
  },
  data() {
    return {
      detailContent: []
    }
  },
  methods: {
    downClick(item) {
      const a = document.createElement('a')
      a.href = item.filePath
      a.download = item.fileName
      a.click()
    }
  },
}
</script>